<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>上海51软件工作室</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="statics/css/bootstrap.min.css">
    <link rel="stylesheet" href="statics/css/font-awesome.min.css">
    <link rel="stylesheet" href="statics/css/style.css">
    <link rel="stylesheet" href="statics/css/login.css">
    <link rel="stylesheet" href="statics/css/main.css">
    <link rel="stylesheet" href="statics/css/iview.css">
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="statics/libs/html5shiv.min.js"></script>
    <script src="statics/libs/respond.min.js"></script>
    <![endif]-->
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?4656e49e8efa9f2ad6868ea26fb8984c";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<body class="signin hold-transition login-page">
<div class="loginscreen animated fadeInDown signinpanel" id="loginBox" v-cloak>
    <div class="row">
        <div class="col-md-7">
            <div class="signin-info">
                <div class="logopanel m-b">
                    <h1> 上海51软件工作室</h1>
                </div>
                <div class="m-b"></div>
                <h4>欢迎使用 <strong>上海51软件工作室</strong></h4>
                <!-- <ul class="m-b">
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 一个微信商城开发平台，能快速开发一个商城</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 使用当下最流行的Spring+SpringMVC+Mybatis+Shiro+J2Cache技术</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 友好的代码结构及注释，便于阅读及二次开发</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 完善的XSS防范及脚本过滤，彻底杜绝XSS攻击</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 日志分级输出，便于分析日志</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 前端使用Vue+iView，上手容易</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 官方QQ群：66502035(大平台系统开发)</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> <a
                            href="https://gitee.com/fuyang_lipengjun/platform" target="_blank" style="color: white;">Git：https://gitee.com/fuyang_lipengjun/platform</a>
                    </li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> <a
                            href="https://apidoc.gitee.com/fuyang_lipengjun/platform" target="_blank"
                            style="color: white;">JavaDoc：https://apidoc.gitee.com/fuyang_lipengjun/platform</a></li>
                </ul> -->
            </div>
        </div>
        <div class="col-md-5">
            <Card class="m-t text-center" style="background: rgba(109, 109, 109, 0.23);border: 0px solid #dddee1;">
                <p style="padding: 0 20px 20px 20px;">51软件综合管理平台</p>
                <div class="form-group has-feedback">
                    <i-input v-model="username" @on-enter="login" placeholder="账号" style="width: 200px;" autofocus/>
                </div>
                <div class="form-group has-feedback">
                    <i-input type="password" v-model="password" @on-enter="login" style="width: 200px;"
                             placeholder="密码"/>
                </div>
                <div class="form-group has-feedback">
                    <div style="display: inline-block;width: 100px;">
                        <i-input v-model="captcha" @on-enter="login"
                                 placeholder="验证码"/>
                    </div>
                    <div style="display: inline-block;width: 100px;">
                        <img style="height: 32px;width: 96px;border-radius: 4px;" alt="如果看不清楚，请单击图片刷新！" title="点击刷新"
                             class="pointer" :src="src" @click="refreshCode">
                    </div>
                </div>
                <div>
                    <i-button type="primary" @click="login" style="width: 200px;">登录</i-button>
                </div>
            </Card>
        </div>
    </div>
    <div class="signup-footer">
        <div class="pull-left">
            2018~2020 &copy; <a href="http://www.51app.ink/" target="_blank">上海51软件工作室</a> 版权所有
        </div>
    </div>
</div>
<!-- /.login-box -->
<script src="statics/libs/jquery.min.js"></script>
<script src="statics/libs/vue.min.js"></script>
<script src="statics/libs/iview.min.js"></script>
<script src="statics/libs/bootstrap.min.js"></script>
<script src="statics/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="statics/libs/fastclick.min.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el: '#loginBox',
        data: {
            username: 'admin',
            password: 'admin',
            captcha: '',
            src: 'captcha.jpg'
        },
        beforeCreate: function () {
            if (self != top) {
                top.location.href = self.location.href;
            }
        },
        methods: {
            refreshCode: function () {
                this.src = "captcha.jpg?t=" + $.now();
            },
            login: function (event) {
                if (vm.username == '') {
                    iview.Message.warning("用户名为空");
                    return false;
                }
                if (vm.password == '') {
                    iview.Message.warning("密码为空");
                    return false;
                }
                if (vm.captcha == '') {
                    iview.Message.warning("验证码为空");
                    return false;
                }
                var data = "username=" + vm.username + "&password=" + vm.password + "&captcha=" + vm.captcha;
                $.ajax({
                    type: "POST",
                    url: "sys/login",
                    data: data,
                    dataType: "json",
                    success: function (result) {
                        if (result.code == 0) {//登录成功
                            parent.location.href = 'index.html';
                        } else {
                            vm.refreshCode();
                            iview.Message.error(result.msg);
                        }
                    }
                });
            }
        },
        created: function () {
            // iview.Notice.success({
            //     title: '码云企业版用户',
            //     desc: '使用此优惠码（<span style="color: #ff8a00">luO2AzfT</span>）会额外赠送 2 个月使用时长哦 <a target="_blank" href="https://gitee.com/enterprises">点我了解企业版</a>',
            //     duration: 0
            // });
            // setTimeout(function () {
            //     iview.Notice.success({
            //         title: '阿里云活动直达',
            //         desc: '阿里云服务器现在买1年享受85折 2年7折 3年5折的优惠  首购云服务器ECS满1000元用幸运券下单还可以抽奖IPAD  <a target="_blank" href="https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=i8s6n64p">点我领取</a>',
            //         duration: 0
            //     });
            // }, 1000);
            // setTimeout(function () {
            //     iview.Notice.success({
            //         title: '腾讯云活动直达',
            //         desc: '<a target="_blank" href="https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=30280f92fc381dfc9e1d9e0e23d25a18">新客户代金券</a>：新客户无门槛领取总价值高达2775元代金券，每种代金券限量500张，先到先得。</br>'+
            //             '<a target="_blank" href="https://cloud.tencent.com/redirect.php?redirect=1011&cps_key=30280f92fc381dfc9e1d9e0e23d25a18">入门云数据库MySQL</a>：云数据库MySQL入门机型仅12元/月，适用于广大用户入门学习、小规模业务系统场景，具备管理和扩展，主从实时热备，自动容灾等数据库全套功能。</br>'+
            //             '<a target="_blank" href="https://cloud.tencent.com/redirect.php?redirect=1010&cps_key=30280f92fc381dfc9e1d9e0e23d25a18">云服务器首购</a>：云服务器新购特惠，最低2折起，1核1G3年仅794.73元，即0.73元/日。</br>'+
            //             '<a target="_blank" href="https://cloud.tencent.com/redirect.php?redirect=1005&cps_key=30280f92fc381dfc9e1d9e0e23d25a18">腾讯云首页</a>：为数百万企业和开发者提供安全、稳定的云服务器、云数据库、CDN等云服务。</br>'+
            //             '<a target="_blank" href="https://cloud.tencent.com/redirect.php?redirect=1001&cps_key=30280f92fc381dfc9e1d9e0e23d25a18">云服务器购买页</a>:腾讯云服务器安全可靠高性能，多种配置供您选择。</br>'+
            //             '<a target="_blank" href="https://cloud.tencent.com/redirect.php?redirect=1003&cps_key=30280f92fc381dfc9e1d9e0e23d25a18">云数据库购买页</a>：腾讯云数据库性能卓越稳定可靠，为您解决数据库运维难题。</br>',
            //         duration: 0
            //     });
            // }, 2000);
        }
    });
</script>
</body>
</html>
